Skip to content

Minor warning fixes #931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 12, 2017
Merged

Minor warning fixes #931

merged 6 commits into from
Apr 12, 2017

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Apr 5, 2017

Reduce the noise from excessive warnings. Most of these are based on the fixits emitted by the compiler

spevans added 4 commits April 5, 2017 16:20
- Replace interpolation with String(describing:)
- Set _Nonnull on _cf_uuid* function prototypes and replace
  unsafeBitCast() with withMemoryRebound()
- Remove unneeded constraints that are inferred.
- Remove unused value and unnecessary unsafeBitCast

- Fix expression implicitly coerced from 'Any?' to Any
@@ -486,7 +486,7 @@ public struct CharacterSet : ReferenceConvertible, Equatable, Hashable, SetAlgeb

@_semantics("convertToObjectiveC")
public func _bridgeToObjectiveC() -> NSCharacterSet {
return unsafeBitCast(_wrapped, to: NSCharacterSet.self)
return _wrapped
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phausler did swift-corelibs-foundation get the new CharacterSet implementation yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parkera Is this the only outstanding issue with this PR? I can always revert this one change if so

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave this one out for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive reverted this change

@@ -75,7 +75,7 @@ extension Measurement where UnitType : Dimension {
/// Add two measurements of the same Unit.
/// - precondition: The `unit` of `lhs` and `rhs` must be `isEqual`.
/// - returns: A measurement of value `lhs.value + rhs.value` and unit `lhs.unit`.
public func +<UnitType : Unit>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Measurement<UnitType> {
public func +<UnitType>(lhs: Measurement<UnitType>, rhs: Measurement<UnitType>) -> Measurement<UnitType> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we make these changes in the Swift overlay too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was done as part of swiftlang/swift#8281

@@ -612,7 +612,7 @@ open class NSKeyedArchiver : NSCoder {

if _isContainer(object) {
guard let codable = object as? NSCoding else {
fatalError("Object \(object) does not conform to NSCoding")
fatalError("Object \(String(describing:object)) does not conform to NSCoding")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick: space after the : please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -11,7 +11,7 @@
/// Decorates types which are backed by a Foundation reference type.
///
/// All `ReferenceConvertible` types are hashable, equatable, and provide description functions.
public protocol ReferenceConvertible : CustomStringConvertible, CustomDebugStringConvertible, Hashable, Equatable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems obnoxious that this generates a warning, but ok.

@parkera
Copy link
Contributor

parkera commented Apr 11, 2017

@swift-ci test and merge

@pushkarnk
Copy link
Member

I think the build failure was later fixed by a PR yesterday.

@swift-ci test and merge

@swift-ci swift-ci merged commit a2f4eb6 into swiftlang:master Apr 12, 2017
@spevans spevans deleted the pr_warning_fixes branch August 9, 2017 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants